package cn.wolfcode.domain;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.alibaba.fastjson.JSON;

public class WechatButton {
    private Long id;

    private String name;

    private Long pId;

    private String type;

    private String key;

    private String url;

    private String appid;

    private String pagepath;
    
    private List<WechatButton> sub_button;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getpId() {
        return pId;
    }

    public void setpId(Long pId) {
        this.pId = pId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getPagepath() {
        return pagepath;
    }

    public void setPagepath(String pagepath) {
        this.pagepath = pagepath;
    }
    
    
    public List<WechatButton> getSub_button() {
		return sub_button;
	}

	public void setSub_button(List<WechatButton> sub_button) {
		this.sub_button = sub_button;
	}

	public String getJsonData() {
    	Map<String,Object> button = new HashMap<>();
    	button.put("id",this.id);
    	button.put("name",this.name);
    	button.put("pId",this.pId);
    	button.put("type",this.type);
    	button.put("key",this.key);
    	button.put("url",this.url);
    	button.put("appid",this.appid);
    	button.put("pagepath",this.pagepath);
    	return JSON.toJSONString(button);
    }
}










